package com.ptu.config;

import com.ptu.util.JwtUtil;
import com.ptu.ws.CustomerEndpoint;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

@Component
public class WebSocketInitializer implements CommandLineRunner {

    @Autowired
    private JwtUtil jwtUtil;

    @Override
    public void run(String... args) {
        // 设置 JwtUtil 到 CustomerEndpoint
        CustomerEndpoint.setJwtUtil(jwtUtil);
    }
} 